package net.deiangi.graphs.core;

import java.util.ArrayList;
import java.util.List;

public class Node {
    /* index in the holding array */
    public int i;
    /* name for the screen */ String name;
    /* screen coordinates */
    public double x;
    public double y;
    /* screen move helper */
    public double dx;
    public double dy;
    /* screen state and color */
    public boolean fixed;
    public boolean selected;
    public List<Edge> to = new ArrayList<Edge>();
    public String note;

    Node(String name, double x, double y) {
        this.name = name;
        this.x = x;
        this.y = y;
    }

    @Override
    public String toString() {
        return String.format("%s(%d)", name, i);
    }
}
